<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>request对象</title>
</head>
<body>

<%-- 

      参数和属性
      jsp内置对象
    1. request对象  是HttpServletRequest类实例
    2. request生命周期;  每请求一个jsp页面会创建一个新的request对象
    3. 在不同页面连续传递参数，
       1>拼接参数在url地址后面
       2>隐藏域  hidden
 --%>
	<%
		request.setCharacterEncoding("UTF-8");

	 	out.println("name ="+request.getAttribute("name"));
	    out.println("<br>");
		
		out.println(request.getRemoteAddr());
		out.println(request.getRemotePort());
		out.println(request.getCharacterEncoding());

		String userName = request.getParameter("username");
		String password = request.getParameter("password");
		out.println("<br>");
		out.println("userName :" + userName + "  password :" + password);
	%>
	<br>
	
	<a href="two_request.jsp?username=<%=userName%>&password=<%=password%>">two_request.jsp</a>
	
	<form action="two_request.jsp" method="POST">
	    <input type="hidden" name="username" value="<%=userName%>"> 
	    <input type="hidden" name="password" value="<%=password%>"> 
	    <input type="submit" value="two_request.jsp">
	</form>
	
</body>
</html>